<HTML><HEAD><TITLE>set_labeling(?SetVars)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>set_labeling(?SetVars)</H1>
Label set variable(s)
<DL>
<DT><EM>SetVars</EM></DT>
<DD>A variable or a list of set variables.
</DD>
</DL>
<H2>Description</H2>
Instantiate all variables in SetVars from first to last, with
		consecutive refinements of their domains until they are ground.<P>
		For each set variable, for each element in its poss (lub\glb), inclusion
		is tried first.<P>
		SetVars can be a set variable instead of a list. Labeling a single set
		variable S can thus be done both with set_labeling([S]) or with
		set_labeling(S).
<H3>Fail Conditions</H3>
Fails if SetVars can not be labeled (there is no solution to the CSP).
<H3>Resatisfiable</H3>
Yes.
<H2>Examples</H2>
<PRE>
?- S `:: [a] + [b, c], T `:: [1] + [2], set_labeling([S, T]).
S = [a, b, c], T = [1, 2] ;
S = [a, b, c], T = [1] ;
S = [a, b], T = [1, 2] ;
S = [a, b], T = [1] ;
S = [a, c], T = [1, 2] ;
S = [a, c], T = [1] ;
S = [a], T = [1, 2] ;
S = [a], T = [1] ;
no

?- S `:: [a] + [b, c], T `:: [1] + [2], set_labeling(S).
S = [a, b, c] ;
S = [a, b] ;
S = [a, c] ;
S = [a] ;
no

</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/set_labeling-2.html">set_labeling / 2</A>, <A HREF="../../lib_public/cardinal/refine-2.html">refine / 2</A>
</BODY></HTML>
